/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package BUS;

import DAO.Topic_DAO;
import DTO.Topic_DTO;
import java.sql.SQLException;
import java.util.ArrayList;

/**
 *
 * @author phihai
 */
public class Topic_BUS {
    
    public ArrayList<Topic_DTO> DanhSachTopic(int IDsite) throws Exception
    {
        Topic_DAO topic = new Topic_DAO();
        return topic.DanhSachTopic(IDsite);
    }
    
    public void themchuyenmuc(int site, String ten) throws SQLException
    {
        DAO.Topic_DAO topicdao = new DAO.Topic_DAO();
        topicdao.themchuyenmuc(site, ten);
    }
    
    public void capnhat_xpath(int ID, String link, String title, String img, String time, String content, String next, String url) throws SQLException
    {
        Topic_DAO tpdao = new Topic_DAO();
        tpdao.capnhat_xpath(ID, link, title, img, time, content, next,url);
    }
    
    public ArrayList<Topic_DTO> lay_xpath(int ID) throws Exception
    {
        
        Topic_DAO tpdao = new Topic_DAO();
        return tpdao.lay_Xpath(ID);
    }
}
